package di;

public class GuanYu {

    private String name="关云长";
    //依赖关系的声明
    private Weapon weapon;

    //战斗方法
    public void fight(){

        System.out.println(name+"使用"+ weapon +"战斗");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Weapon getWeapon() {
        return weapon;
    }

    public void setWeapon(Weapon weapon) {
        this.weapon = weapon;
    }
}
